<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    正在测试localStorage的使用
</body>
<script>
    // console.log(localStorage);
    // console.log(window.localStorage);
    // console.log(window.localStorage === localStorage);
    
    // localStorage.setItem("name","admin");
    // localStorage.setItem("name","root");
    // localStorage.setItem("age",18);
    // localStorage.setItem("sex","男");
    // localStorage.setItem("obj", {a:10} );

    // console.log(localStorage.getItem("name"))
    // console.log(localStorage.getItem("age"))
    // console.log(localStorage.getItem("sex"))
    // console.log(localStorage.getItem("msg"))

    // localStorage.removeItem("name")
    // localStorage.removeItem("sex")

    // localStorage.clear();

    // console.log(localStorage);
    // console.log(localStorage.length);
</script>
</html>